package vera.com.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class conexion {
	
	static Connection Conect=null;
	Statement Statement=null;
    static String DataBaseName = "springmvc";
    static String UserName = "root";
	static String Password = "nacional";
	static String Url = "jdbc:mysql://localhost/"+DataBaseName;
	static 	String nombre_driver="com.mysql.jdbc.Driver";
	
	public Connection Conexion(){
		try
		{
			Class.forName(nombre_driver);
			Conect=DriverManager.getConnection(Url,UserName,Password);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		return Conect;

	}
	
}
